<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
    <TITLE>Untitled Page</TITLE>
    <META http-equiv=Content-Type content="text/html; charset=utf-8">
    <script src="js/jquery-2.1.0.js"></script>
    <script src="js/script.js"></script>
    <link rel="stylesheet" href="bootstrap/css/iconfont.css" >
    <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" >
    <!--<script src="Top.files/script.js"></script>-->
    <STYLE type=text/css>
        {
            FONT-SIZE: 12px
        }
        .gridView {
            BORDER-RIGHT: #bad6ec 1px; BORDER-TOP: #bad6ec 1px; BORDER-LEFT: #bad6ec 1px; COLOR: #566984; BORDER-BOTTOM: #bad6ec 1px; FONT-FAMILY: Courier New
        }
        .gridViewHeader {
            BORDER-RIGHT: #bad6ec 1px solid; BORDER-TOP: #bad6ec 1px solid; BACKGROUND-IMAGE: url(../images/bg_th.gif); BORDER-LEFT: #bad6ec 1px solid; LINE-HEIGHT: 27px; BORDER-BOTTOM: #bad6ec 1px solid
        }
        .gridViewItem {
            BORDER-RIGHT: #bad6ec 1px solid; BORDER-TOP: #bad6ec 1px solid; BORDER-LEFT: #bad6ec 1px solid; LINE-HEIGHT: 32px; BORDER-BOTTOM: #bad6ec 1px solid; TEXT-ALIGN: center
        }
        .cmdField {
            BORDER-RIGHT: 0px; BORDER-TOP: 0px; BACKGROUND-IMAGE: url(../images/bg_rectbtn.png); OVERFLOW: hidden; BORDER-LEFT: 0px; WIDTH: 67px; COLOR: #364c6d; LINE-HEIGHT: 27px; BORDER-BOTTOM: 0px; BACKGROUND-REPEAT: repeat-x; HEIGHT: 27px; BACKGROUND-COLOR: transparent; TEXT-DECORATION: none
        }
        .buttonBlue {
            BORDER-RIGHT: 0px; BORDER-TOP: 0px; BACKGROUND-IMAGE: url(../images/bg_button_blue.gif); BORDER-LEFT: 0px; WIDTH: 78px; COLOR: white; BORDER-BOTTOM: 0px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 21px
        }
    </STYLE>
    <META content="MSHTML 6.00.2900.5848" name=GENERATOR>
</HEAD>
<BODY
        style="BACKGROUND-POSITION-Y: -120px; BACKGROUND-IMAGE: url(../images/bg.gif); BACKGROUND-REPEAT: repeat-x">
<SCRIPT type=text/javascript>
    //<![CDATA[
    var theForm = document.forms['aspnetForm'];
    if (!theForm) {
        theForm = document.aspnetForm;
    }
    function __doPostBack(eventTarget, eventArgument) {
        if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
            theForm.__EVENTTARGET.value = eventTarget;
            theForm.__EVENTARGUMENT.value = eventArgument;
            theForm.submit();
        }
    }
    //]]>
</SCRIPT>
<SCRIPT src="EmployeeMgr.files/WebResource.axd" type=text/javascript></SCRIPT>
<SCRIPT src="EmployeeMgr.files/ScriptResource.axd"
        type=text/javascript></SCRIPT>
<SCRIPT
        src="EmployeeMgr.files\ScriptResource(1).axd"
        type=text/javascript></SCRIPT>
<DIV>
    <TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
        <TBODY>
        <TR
                style="BACKGROUND-IMAGE: url(../images/bg_header.gif); BACKGROUND-REPEAT: repeat-x"
                height=47>
            <TD width=10><SPAN
                    style="FLOAT: left; BACKGROUND-IMAGE: url(../images/main_hl.gif); WIDTH: 15px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 47px"></SPAN></TD>
            <TD><SPAN
                    style="FLOAT: left; BACKGROUND-IMAGE: url(../images/main_hl2.gif); WIDTH: 15px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 47px"></SPAN><SPAN
                    style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; FLOAT: left; BACKGROUND-IMAGE: url(../images/main_hb.gif); PADDING-BOTTOM: 10px; COLOR: white; PADDING-TOP: 10px; BACKGROUND-REPEAT: repeat-x; HEIGHT: 47px; TEXT-ALIGN: center; 0px: ">学生添加 </SPAN><SPAN
                    style="FLOAT: left; BACKGROUND-IMAGE: url(../images/main_hr.gif); WIDTH: 60px; BACKGROUND-REPEAT: no-repeat; HEIGHT: 47px"></SPAN></TD>
            <TD
                    style="BACKGROUND-POSITION: 50% bottom; BACKGROUND-IMAGE: url(../images/main_rc.gif)"
                    width=10></TD>
        </TR>
        <TR>
            <TD style="BACKGROUND-IMAGE: url(../images/main_ls.gif)">&nbsp;</TD>
            <TD
                    style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-BOTTOM: 10px; COLOR: #566984; PADDING-TOP: 10px; BACKGROUND-COLOR: white"
                    vAlign=top align=middle>
                <DIV>

                    <TABLE class=gridView id=ctl00_ContentPlaceHolder2_GridView1
                           style="WIDTH: 100%; BORDER-COLLAPSE: collapse" cellSpacing=0 rules=all
                           border=1>



                        <div class="col-5">
                            <form id="form">
                                <input id="id" name="yangliu.id" type="hidden"/>
                                <div class="form-group">
                                   <label> 姓名:</label>
                                    <input id="name" type="text" name="yangliu.name" class="form-control">
                                    <small class="form-text text-muted"></small>
                                </div>
                                <div class="form-group">
                                    <label> 班级:</label>

                                    <select id="banji" name="yangliu.bid" class="form-control">


                                    </select>
                                    <small class="form-text text-muted"></small>
                                </div>

                                <div class="form-group">
                                    <label>性别: </label>
                                    <input id="sex" type="text" name="yangliu.sex" class="form-control">
                                    <small class="form-text text-muted"></small>
                                </div>
                                    <div class="form-group">
                                        <label>住址: </label>
                                        <input id="address" type="text" name="yangliu.address" class="form-control">
                                        <small class="form-text text-muted"></small>
                                    </div>
                                    <small class="form-text text-muted"></small>


                                <button type="button" onclick="sub()" class="btn btn-primary">确定提交</button>
                                <button type="button" onclick="window.history.back()" class="btn btn-outline-secondary">取消</button>
  </form>
                        </div>

                    </TABLE>
                </DIV>
            </TD>
            <TD style="BACKGROUND-IMAGE: url(../images/main_rs.gif)"></TD>
        </TR>
        <TR
                style="BACKGROUND-IMAGE: url(../images/main_fs.gif); BACKGROUND-REPEAT: repeat-x"
                height=10>
            <TD style="BACKGROUND-IMAGE: url(../images/main_lf.gif)"></TD>
            <TD style="BACKGROUND-IMAGE: url(../images/main_fs.gif)"></TD>
            <TD
                    style="BACKGROUND-IMAGE: url(../images/main_rf.gif)"></TD>
        </TR>
        </TBODY>
    </TABLE>
</DIV>
</BODY>
<SCRIPT type=text/javascript>
    //<![CDATA[
    Sys.Application.initialize();
$(function(){
    var id = (window.location.href).split('?')[1];
    $.ajax({
        type:"post",
        url:baseUrl+"/yangliu!bj",
        dataType:"json",
        ansyc:false,
        success:function (data) {



          $("#banji").empty();
              var ht = '';
              $.each(data,function (i,v) {
                  var c ='';
                    ht = ht + '<option  value="'+v.id+'">'+v.bname+'</option>';
              });
              $("#banji").append(ht);
        }

    });
    if(id != null){
        var did ='';
        $.ajax({
            type:"post",
            url:baseUrl+"/yangliu!edit",
            data:{"yangliu.id":id},
            dataType:"json",
            ansyc:false,
            success:function (data) {
                var did ="";
                if(data != null) {
                    $("#id").val(data.id);
                    $("#name").val(data.name);
                    $("#bid").val(data.bname);
                    $("#sex").val(data.sex);
                    $("#address").val(data.address);

                }
                /*  $("#dept").empty();
                  var ht = '';
                  $.each(data.list,function (i,v) {
                      var c ='';
                      if(v.id ==did ){c ='selected=true'};

                      ht = ht + '<option '+c+' value="'+v.id+'">'+v.dname+'</option>';
                  });
                  $("#dept").append(ht);*/
            }

        });
    }
})
    function sub() {
        $.ajax({
            type: "post",
            url: baseUrl + "/yangliu!save",
            data: $("#form").serialize(),//{'name':name，‘age’:age}
            success: function () {
                window.location.href = "EmployeeMgr.htm";
            }

        })
    }
</SCRIPT>


</HTML>
